package com.english_test_sys.service;

import com.english_test_sys.pojo.WrongQuestion;

import java.util.List;

public interface WrongQuestionService {
    // 添加错题记录
    WrongQuestion addWrongQuestion(WrongQuestion wrongQuestion);

    // 更新错题记录
    boolean updateWrongQuestion(WrongQuestion wrongQuestion);

    // 根据ID获取错题
    WrongQuestion getWrongQuestionById(int id);

    // 获取用户所有错题
    List<WrongQuestion> getWrongQuestionsByUserId(int userId);

    // 获取用户特定分类的错题
    List<WrongQuestion> getWrongQuestionsByUserIdAndCategory(int userId, String category);

    // 获取用户特定题目的错题记录
    WrongQuestion getWrongQuestionByUserAndQuestion(int userId,int  questionId);

    // 增加错题的错误次数
    boolean incrementWrongCount(int id);
}
